<?php
//
//  INDEX PAGE
//
require_once('header.php');
?> 

    <section>
        <div class="table-frame padding">
            <form method="post" action="<?php echo $Controller->page_url(); ?>">
                <ul id="report-buttons">
                    <li><button type="submit" class="labels show-tool-tip" value="report_mailing_labels"           title="Download this week's subscription mail-out labels for your publication." name="action">Active, Expiring &amp; Recently Expired Labels</button></li>
                    <li><button type="submit" class="labels show-tool-tip" value="report_expiring_expired_labels"  title="Download the expired, recently expired and expiring labels." name="action">Expiring &amp; Expired Labels</button></li>
                    <li><button type="submit" class="labels show-tool-tip" value="report_recently_labels"          title="Download the expired and recently expired labels." name="action">Recently Expired Labels</button></li>
                    <li><button type="submit" class="labels show-tool-tip" value="report_expired_labels"           title="Download the expired labels." name="action">Expired Labels</button></li>
                    <!-- 
                    <li><button type="submit" class="subs show-tool-tip"   value="report_active_subs"              title="The subscription report details all of your current subscriptions and the user accounts tied to them. Keep copies of these either printed out or on your machine to check back to later." name="action">Subscription Report  Wk#<?php echo get_weeknum(); ?></button></li>
                    <li><button type="submit" class="subs show-tool-tip"   value="report_expiring_subs"            title="This report will show all your Expired/Expiring subscriptions." name="action">Expiring/Expired Report Wk#<?php echo get_weeknum(); ?></button></li>
                    -->
                    <li><button type="submit" class="show-tool-tip"        value="report_weekly_totals"            title="Your totals report outlines your mail-out distribution numbers according to your Publication's settings. It is automatically generated and mailed every week, but you can always view this week's here too." name="action">Totals Report  Wk#<?php echo get_weeknum(); ?></button></li>
                    <li><button type="submit" class="show-tool-tip"        value="report_export_data"              title="A raw data export - useful for backups. This will include ALL records, whether they are expired or not." name="action">Export ALL raw data.</button></li>
                    <li><button type="submit" class="scrub show-tool-tip"  value="scrub"                           title="Scrub Subscription database will go through all your subscriptions and make sure they're correct, and fix those that are not. This is done automatically every morning, but it doesn't hurt to run it again if you have done a lot of updates." name="action">Scrub Subscriptions</button></li>
                </ul>
            </form>
             
             <table class="subscription-table">
                <thead>
                    <tr class="heading-row skin-gradient">
                        <th class=""><h1 class="section-title">REPORTS</h1></th>
                    </tr>
                </thead>
                
                <tbody>
                    <?php
                    $reports = Report::find_reports(2);
                    if ( $reports ) {
                        $table_title = 'AUTO-GENERATED WEEKLY TOTAL REPORTS';
                        include('table.reports.php');
                    }
                    $reports = Report::find_reports(1);
                    if ( $reports ) {
                        $table_title = 'REQUESTED EXPORTS';
                        include('table.reports.php');
                    }
                    ?>
                </tbody>
            </table>
        </div>
    </section>
<?php
//
//  End page.
//
require_once('footer.php');
?>




